package api.sea;

import conf.Url;
import util.HttpClientUtils;
import util.ResponseData;

import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
import java.util.HashMap;
import java.util.Map;

public class DeliverGoodsApi {
    private static final String direct_send_url= Url.Base_Url+"consumer/lgsWtd7/add";
    public static ResponseData direct_goods(Object entrustmentFile, String sendDate, String planSendDate, int sendBoxNumber,
                                            String sendPalletsNumber, String logisticsCompany, String logisticsOrderNo, String logisticsFreight,
                                             String systemNumber, String state) throws IOException, URISyntaxException {
        Map<String,Object> data=new HashMap<>();
        data.put("entrustmentFile",entrustmentFile);
        data.put("sendDate",sendDate);
        data.put("planSendDate",planSendDate);
        data.put("sendBoxNumber",sendBoxNumber);
        data.put("sendPalletsNumber",sendPalletsNumber);
        data.put("logisticsCompany",logisticsCompany);
        data.put("logisticsOrderNo",logisticsOrderNo);
        data.put("logisticsFreight",logisticsFreight);
        data.put("systemNumber",systemNumber);
        data.put("state",state);
        return HttpClientUtils.post_json(direct_send_url,data);
    }
}
